import request from '@/utils/request'

const areaApi = {
  // 获取省份列表
  async getProvinces() {
    return uni.request({
      url: '/api/region/provinces',
      method: 'GET'
    });
  },
  
  // 获取城市列表
  async getCities(provinceId) {
    return uni.request({
      url: `/api/region/cities/${provinceId}`,
      method: 'GET'
    });
  },
  
  // 获取区县列表
  async getDistricts(cityId) {
    return uni.request({
      url: `/api/region/districts/${cityId}`,
      method: 'GET'
    });
  }
}

export { areaApi } 